window: Avoid excessive resizing with popovers
authorMatthias Clasen <mclasen@redhat.com>
Wed, 9 Mar 2016 13:58:23 +0000 (08:58 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 9 Mar 2016 13:58:23 +0000 (08:58 -0500)
Under Wayland, popovers use subsurfaces, and we end up getting
configure events for these delivered to the toplevel they're in.
To avoid triggering resize loops, ignore configure events that
are not for the toplevel window itself.

https://bugzilla.gnome.org/show_bug.cgi?id=763351

gtk/gtkwindow.c

index f5cf1baf8fb1266a137338c224841998f64965b5..a2be09da834292a6ca714d8c4065820f68818617 100644 (file)
@@ -7655,6 +7655,9 @@ gtk_window_configure_event (GtkWidget         *widget,
   if (!_gtk_widget_is_toplevel (widget))
     return FALSE;
 
+  if (_gtk_widget_get_window (widget) != event->window)
+    return TRUE;
+
   /* If this is a gratuitous ConfigureNotify that's already
    * the same as our allocation, then we can fizzle it out.
    * This is the case for dragging windows around.